<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /*
            交换变量
        */
        var num1=5;
        var num2=3;
        var temp;
        temp=num2;
        num2=num1;
        num1=temp;
        console.log(num1,num2);


        /*
            分支语句 if...else..    if...else if...else...
        */
        var sum=prompt("请输入一个数值")
        if(sum%2==0)
        {
            document.write("你输入的是偶数")
        }else{
            document.write("你输入的是奇数")
        }

        var score=prompt("请输入你的分数")
        if(score<60&&score>=0)
        {   
            document.write("不及格")
        }else if(score>=60&&score<80)
        {
            document.write("良好")
        }else if(score>=80&&score<=100){
            document.write("优秀")
        }
           

    </script>
</head>
<body>
    
</body>
</html>